package com.hang.gymmanager.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hang.gymmanager.entity.ActivityEntity;
import com.hang.gymmanager.req.PageActivityReq;
import com.hang.gymmanager.res.AddActPlaceRes;
import com.hang.gymmanager.res.PageActivityRes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.time.LocalDate;
import java.util.List;

@Component
@Mapper
public interface ActivityMapper extends BaseMapper<ActivityEntity> {
    Page<PageActivityRes> allActivity(@Param("req") PageActivityReq req,
                                      Page page);

    List<AddActPlaceRes> actPlaceRecord(@Param("now") LocalDate now);
}
